home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-18
/
bklbat.zip
/
BKL.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-02-04
|
3KB
|
88 lines
@echo off
cls
if not %1!==?! goto start
echo BKL.BAT Dan Goodell 12/91 (version 1)
echo
echo This batch file will backup assorted files and/or directories that are
echo specified in a .LST (list) file. The list file must be on the specified
echo drive where the .LZH backup file will be recorded. The date stamp of an
echo .UPD (update) directory entry will be recorded with the date and time of
echo the backup.
echo This batch file is designed around the free file compression and
echo uncompression utility LHA.EXE.
echo
echo (This version is NOT capable of chaining errors from "COMMAND /C" calls.
echo Use this version with DOS 3.3 or later and the "CALL" command.)
echo
goto syntax
:start
if %1!==chain! set chain=Y
if %1!==CHAIN! set chain=Y
if %chain%!==Y! shift
for %%d in (a: A: b: B:) do if %%d!==%2! set drv=%2
if %drv%!==! goto noparm
:pack
echo checking drive %drv% for %1.LST file...
rem ----remove next two lines if CHKDRV.COM not used-----
CHKDRV %drv%
if errorlevel 2 goto baddrv
if not exist %drv%%1.lst goto baddisk
LHA u /x1 /z2 %drv%%1.lzh @%drv%%1.lst /wC:
if errorlevel 2 goto packerr
:packdone
echo
echo updating .UPD stamp...
rem > %drv%%1.upd
echo %1 files backup completed.
echo
goto errors
:baddrv
echo
echo ERROR! Drive %drv% not ready. Unable to backup %1 files.
echo
set err=%err% %1
goto errors
:baddisk
echo
echo ERROR! Disk in drive %drv% does not contain %1.LST backup list.
echo Unable to backup %1 files.
echo
set err=%err% %1
goto errors
:packerr
echo
echo ERROR! LHA unable to backup %1 files.
echo
set err=%err% %1
goto errors
:errors
if %chain%!==Y! goto end
if %err%!==! goto end
echo
echo WARNING! The following backups were not completed due to errors:
echo Error list:%err%
echo
set err=
goto end
:noparm
echo
echo ERROR! Incorrect parameters.
echo command: BKL %1 %drv%
echo
:syntax
echo BKL.BAT backup program
echo Syntax: BKL [chain] list d:
echo where: d: = destination drive of backup (A: or B:)
echo list = name of backup list (on dest drive)
echo chain = optional parameter used when calling
echo BKL.BAT from a batch file to retain a
echo running error list of incomplete backups
echo
:end
set chain=
set drv=